package com.syg.SpringMVC._08_SpringMVC_GetFormParam;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * SpringMVC获取请求参数
 */
@Controller
public class _01_GetFormParam {
    /**
     * 获取form表单中的参数,SpringMVC会自动将表单中name属性的值反射到方法中相同的参数上
     * @return
     */
    @RequestMapping("getFormParam.do")
    public String test1(String username,String salary) {
        System.out.println("页面传进来的username===>" + username + ",页面传进来的薪水salary===>" + salary);
        return "WEB-INF/JspPage/_08_SpringMVC_GetFormParam/_08_SpringMVC_GetFormParam.jsp";//返回真实路径
    }
}
